package ddz;
import java.util.*;
public class mei4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();
        int[] c = new int[m];
        int[] a = new int[m];
        int[] b = new int[m];
        for (int i = 0; i < m; i++) {
            c[i] = sc.nextInt();
        }
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < m; i++) {
            b[i] = sc.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < m; i++) {
            if(k == c[i]){
                ans += a[i];
            }
            else if(i + 1 < m && k == c[i + 1]){
                if(b[i] > a[i + 1]){
                    ans += b[i];
                    k = c[i];
                }
            }
            else {
                k = c[i];
                ans += b[i];
            }
        }
        System.out.println(ans);
    }
}
/*
3 5 1
2 1 2 3 2
9 6 2 1 7
1 3 0 5 3
 */